-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor equihash
code
#1357
Refactor equihash
code
#1357
Conversation
74f9aaa
to
d4b405f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
} | ||
|
||
impl Params { | ||
/// Returns `None` if the parameters are invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional/Nitpick: Could the docs be more verbose, maybe with a reference to where and/or how the parameters are used?
/// Returns `None` if the parameters are invalid. | |
/// Accepts `n` and `k` values to use as Equihash parameters. | |
/// | |
/// Returns a new instance of [`Params`] if the provided values are valid, or | |
/// `None` if the parameters are invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc change here was just to clarify the change from Error
(there is only one "error" case here, and Error
is about verification errors, so I transitioned these to Option
). I've opened #1358 for the general case of documenting the crate-private methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post-hoc ACK
Move-only; my main motivation is moving the minimal-encoding functions into a separate submodule, so that the inverse functions introduced in #1083 can also be placed there (with round-trip tests and proptests).